﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.world {
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class HandleActionCommand extends Command {

        public var event:InfoEvent;
        public var worldModel:WorldModel;

        override public function execute():void{
            var _local1:IMachine = (this.worldModel.getActor(this.event.id) as IMachine);
            var _local2:InfoEvent = _local1.getAction(this.event.info);
            if (_local2){
                dispatch(new InfoEvent(EventConstants.ADD_ACTION_TO_AVATAR, _local1.roomId, _local2));
            };
        }

    }
}//package net.wooga.pets.controllers.world 
